package org.yi.fc.enums;


public enum CommonStatus {

	ENABLE(1, "启用"),
	DISABLE(0, "禁用"),
	DEFAULT(1, "启用");
	
	private Integer status;
	
	private String desc;
	
	private CommonStatus(Integer status, String desc) {
		this.status = status;
		this.desc = desc;
	}
	
	public static CommonStatus parseEnum(int status){
		for(CommonStatus commonStatus : values()){
			if(status == commonStatus.getStatus()) {
				return commonStatus;
			}
		}
		return DEFAULT;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
}
